package org.aphasia4j.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 * Practice for handling picture to word lessons.
 * 
 * @author hillger.t
 */
public class WordPractice extends Practice {
  @OneToOne(cascade = { CascadeType.PERSIST })
  private Word word;

  @OneToMany(cascade = { CascadeType.PERSIST })
  private List<Word> words = new ArrayList<Word>();

  public List<Word> getWords() {
    return words;
  }

  public void setWords(List<Word> words) {
    this.words = words;
  }

  public void addWord(Word word) {
    this.words.add(word);
  }

  public Word getWord() {
    return word;
  }

  public void setWord(Word word) {
    this.word = word;
  }
}
